import { inject, injectable } from 'inversify';
import React from 'react';
import type { EditorMode, IViewService, IModeRegistry } from '../types';

@injectable()
export class ViewService implements IViewService {
    constructor(
        @inject('IModeRegistry') private modeRegistry: IModeRegistry
    ) { }

    renderView(mode: EditorMode): React.ReactNode {
        const feature = this.modeRegistry.getModeFeature(mode);
        return feature?.view || null;
    }
} 